/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2024 STMicroelectronics.
  * All rights reserved.
  *
  * This software is licensed under terms that can be found in the LICENSE file
  * in the root directory of this software component.
  * If no LICENSE file comes with this software, it is provided AS-IS.
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32g0xx_hal.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */

/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */

/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
#define IB1_Pin GPIO_PIN_6
#define IB1_GPIO_Port GPIOE
#define IA1_Pin GPIO_PIN_12
#define IA1_GPIO_Port GPIOC
#define IB2_Pin GPIO_PIN_3
#define IB2_GPIO_Port GPIOF
#define IA2_Pin GPIO_PIN_4
#define IA2_GPIO_Port GPIOF
#define Mortor_Ctrl_Pin GPIO_PIN_5
#define Mortor_Ctrl_GPIO_Port GPIOF
#define S2_Pin GPIO_PIN_0
#define S2_GPIO_Port GPIOC
#define S3_Pin GPIO_PIN_1
#define S3_GPIO_Port GPIOC
#define S5_Pin GPIO_PIN_2
#define S5_GPIO_Port GPIOC
#define S1_Pin GPIO_PIN_3
#define S1_GPIO_Port GPIOC
#define PRESS_AD_Pin GPIO_PIN_0
#define PRESS_AD_GPIO_Port GPIOA
#define ALARM_LAMP_Pin GPIO_PIN_1
#define ALARM_LAMP_GPIO_Port GPIOA
#define ALARM_LAMP1_Pin GPIO_PIN_2
#define ALARM_LAMP1_GPIO_Port GPIOA
#define ALARM_LAMP2_Pin GPIO_PIN_3
#define ALARM_LAMP2_GPIO_Port GPIOA
#define Motor_DA_Pin GPIO_PIN_4
#define Motor_DA_GPIO_Port GPIOA
#define DC_POWER_AD_Pin GPIO_PIN_5
#define DC_POWER_AD_GPIO_Port GPIOA
#define V20_AD_Pin GPIO_PIN_6
#define V20_AD_GPIO_Port GPIOA
#define Vbat_AD_Pin GPIO_PIN_7
#define Vbat_AD_GPIO_Port GPIOA
#define VALVE_FG_Pin GPIO_PIN_4
#define VALVE_FG_GPIO_Port GPIOC
#define VLAVE6_FG_Pin GPIO_PIN_5
#define VLAVE6_FG_GPIO_Port GPIOC
#define PRESS_PULSE_AD_Pin GPIO_PIN_0
#define PRESS_PULSE_AD_GPIO_Port GPIOB
#define VALVE5_FG_Pin GPIO_PIN_1
#define VALVE5_FG_GPIO_Port GPIOB
#define TEMP1_Pin GPIO_PIN_2
#define TEMP1_GPIO_Port GPIOB
#define SW_Ctrl_Pin GPIO_PIN_6
#define SW_Ctrl_GPIO_Port GPIOF
#define CON_20V_Pin GPIO_PIN_7
#define CON_20V_GPIO_Port GPIOF
#define CON_BAT_Pin GPIO_PIN_7
#define CON_BAT_GPIO_Port GPIOE
#define WIFI_TXD5_Pin GPIO_PIN_10
#define WIFI_TXD5_GPIO_Port GPIOE
#define WIFI_RXD5_Pin GPIO_PIN_11
#define WIFI_RXD5_GPIO_Port GPIOE
#define VALVE1_FG_Pin GPIO_PIN_12
#define VALVE1_FG_GPIO_Port GPIOE
#define VALVE2_FG_Pin GPIO_PIN_13
#define VALVE2_FG_GPIO_Port GPIOE
#define I2C2_SDO_Pin GPIO_PIN_14
#define I2C2_SDO_GPIO_Port GPIOE
#define USB_Ctrl_Pin GPIO_PIN_15
#define USB_Ctrl_GPIO_Port GPIOE
#define I2C2_SCL_Pin GPIO_PIN_10
#define I2C2_SCL_GPIO_Port GPIOB
#define I2C2_SDA_Pin GPIO_PIN_11
#define I2C2_SDA_GPIO_Port GPIOB
#define WIFI_EN_Pin GPIO_PIN_12
#define WIFI_EN_GPIO_Port GPIOB
#define ALARM_CON_Pin GPIO_PIN_13
#define ALARM_CON_GPIO_Port GPIOB
#define Motor_FG_Pin GPIO_PIN_14
#define Motor_FG_GPIO_Port GPIOB
#define FAN_FG_Pin GPIO_PIN_15
#define FAN_FG_GPIO_Port GPIOB
#define FAN_CON_Pin GPIO_PIN_8
#define FAN_CON_GPIO_Port GPIOA
#define FAN_PWM_Pin GPIO_PIN_6
#define FAN_PWM_GPIO_Port GPIOC
#define VALVE_Ctrl_Pin GPIO_PIN_7
#define VALVE_Ctrl_GPIO_Port GPIOC
#define LCD_CS_Pin GPIO_PIN_8
#define LCD_CS_GPIO_Port GPIOD
#define LCD_RS_Pin GPIO_PIN_9
#define LCD_RS_GPIO_Port GPIOD
#define LCD_WR_Pin GPIO_PIN_10
#define LCD_WR_GPIO_Port GPIOD
#define LCD_RD_Pin GPIO_PIN_11
#define LCD_RD_GPIO_Port GPIOD
#define VALVE1_Ctrl_Pin GPIO_PIN_12
#define VALVE1_Ctrl_GPIO_Port GPIOD
#define VALVE2_Ctrl_Pin GPIO_PIN_13
#define VALVE2_Ctrl_GPIO_Port GPIOD
#define VALVE6_Ctrl_Pin GPIO_PIN_14
#define VALVE6_Ctrl_GPIO_Port GPIOD
#define VALVE5_Ctrl_Pin GPIO_PIN_15
#define VALVE5_Ctrl_GPIO_Port GPIOD
#define LCD_RST_Pin GPIO_PIN_9
#define LCD_RST_GPIO_Port GPIOC
#define DB7_Pin GPIO_PIN_0
#define DB7_GPIO_Port GPIOD
#define DB6_Pin GPIO_PIN_1
#define DB6_GPIO_Port GPIOD
#define DB5_Pin GPIO_PIN_2
#define DB5_GPIO_Port GPIOD
#define DB4_Pin GPIO_PIN_3
#define DB4_GPIO_Port GPIOD
#define DB3_Pin GPIO_PIN_4
#define DB3_GPIO_Port GPIOD
#define DB2_Pin GPIO_PIN_5
#define DB2_GPIO_Port GPIOD
#define DB1_Pin GPIO_PIN_6
#define DB1_GPIO_Port GPIOD
#define DB0_Pin GPIO_PIN_7
#define DB0_GPIO_Port GPIOD
#define LED_CON_Pin GPIO_PIN_1
#define LED_CON_GPIO_Port GPIOE
#define POWER_DET_Pin GPIO_PIN_2
#define POWER_DET_GPIO_Port GPIOE
#define ON_OFF_Pin GPIO_PIN_3
#define ON_OFF_GPIO_Port GPIOE

/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */
